<template>
  <ul class="app-tab-bar">
    <li
      :active="currentActive===''?active === item.name:currentActive===item.name"
      v-for="(item, index) in tabs"
      :key="index"
      @click="()=>{currentActive= item.name;$emit('tab-click-handler', item.name)}"
    >
    <i v-show="item.iconClass" :class="item.iconClass"></i>
      {{ item.label }}
    </li>
  </ul>
</template>
<script>
export default {
  data () {
    return { currentActive: '' }
  },
  props: { tabs: { type: Array }, active: { type: String } }
}
</script>
